//
//  PreferenceController.h
//  ABlip
//
//  Created by dawid on 08-12-21.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>


extern NSString* const ABL_Transparency;
extern NSString* const ABL_TransparencyChangedNotification;
extern NSString* const ABL_MaxMsgShow;
extern NSString* const ABL_MaxMsgShowChangedNotification;
extern NSString* const ABL_RefreshInterval;
extern NSString* const ABL_LoginString;
extern NSString* const ABL_LastUpdateId;
extern NSString* const ABL_AlwaysOnTop;
extern NSString* const ABL_UpdatePreferences;
extern NSString* const ABL_SendMessageNotification;
extern NSString* const ABL_HotKeyNotification;
extern NSString* const ABL_HideAfterSendMsg;
extern NSString* const ABL_HideGrowl;
extern NSString* const ABL_HideIconBadge;
extern NSString* const ABL_ShowYoutube;

extern NSString* const ABL_ErrorMessageNotification;
extern NSString* const ABL_QuoteClickedNotification;
extern NSString* const ABL_DeleteMessageClickedNotification;
extern NSString* const ABL_CommandMinusNotification;
extern NSString* const ABL_CommandPlusNotification;


@interface PreferenceController : NSWindowController {
	int maxMsgShow;
	float transparency;
	int refreshInterval;
	int alwaysOnTop;
	int hideAfterSendMsg;
	int hideGrowl;
	int hideIconBadge;
	int showYoutube;
	IBOutlet NSSlider *transparencySlider;
	IBOutlet NSComboBox *maxMsgBox;
	IBOutlet NSComboBox *refreshTimeBox;
	IBOutlet NSTextField *loginField;
	IBOutlet NSTextField *passwordField;
	IBOutlet NSButton *alwaysOnTopCheckBox;
	IBOutlet NSButton *hideAfterSendCheckBox;
	IBOutlet NSButton *hideGrowlCheckBox;
	IBOutlet NSButton *hideIconBadgeCheckBox;	
	IBOutlet NSButton *showYoutubeCheckBox;
	IBOutlet NSTextField *userField;
	IBOutlet NSSecureTextField *passField;
}
@property int maxMsgShow;
@property float transparency;
@property int refreshInterval;
@property int alwaysOnTop;
@property int hideAfterSendMsg;
@property int hideGrowl;
@property int hideIconBadge;
-(IBAction) resetPreferences:(id)sender;
-(IBAction) sliderChangeValue:(id)sender;
-(IBAction)changeLoginPasword:(id)sender;
-(IBAction)trySaveToKeyChain:(id)sender;
-(void)displayAlertWithMessageText:(NSString *)messageText;
-(void)modifyItemFromKeychain:(NSString*)newLogin password:(NSString*)passwd;
- (NSString*)getPasswordFromKeychainForLogin:(NSString*)searchLogin;
@end
